{{useCss "app-pages/css/cart.scss"}}
<div class="menubox">
    <div class="box">
        <div class="mleft">
            我的购物车
        </div>
        <div class="mright">
            <button class="btn" event-click="{{'$Event.cart.changToEdit'}}">{{#if $Cache.cart.cartPrivate}}完成{{#else}}编辑{{/if}}</button>
        </div>
    </div>
</div>
<div class="_cart">
    <div class="cartbox">
        {{#if user.cart_detail.length}} {{#each user.cart_detail}} {{#each goods_info}}
        <div class="_cart_item">
            <div class="ileft">
                <href to="/goods_details.html?id={{goods_id}}">
                    <img bind-src="{{goods.preview_img_url}}?imageView/1/h/120" />
                </href>
            </div>
            <div class="imedium">
                <href to="/goods-details.html?id={{goods_id}}">
                    <div class="name">{{goods.goods_name+' '+goods.intro}}
                    </div>
                </href>
                <div class="info">
                    数量：{{num}}
                </div>
            </div>
            <div class="iright">
                <div class="_price {{$Top.$Cache.cart.cartPrivate}}">
                    <div>单价</div>
                    <div class="price">￥{{#Fixed goods.price}}</div>
                </div>
                <div class="_num">
                    <button class="btn" event-click="{{'$Top.$Event.cart.remove_goods'}}">移除</button>
                    <input event-change="{{'$Top.$Event.cart.update_cart_num'}}" class="num" type="number" min=1 max="100" value="{{num}}" bind-input="{{'num'}}" />
                </div>
            </div>
        </div>
        {{/each}} {{/each}} {{#else}}
        <p>购物车中暂无商品</p>
        {{/if}}
    </div>

    <div class="blockbottom"></div>
    <div class="floatcount">
        <div class="countbox">
            <span class="price">商品原价总计：
                <span>￥{{#Fixed $Cache.cart.moni_ach.sou_cash}}</span>
            </span>
            <span class="price">运费：
                <span>￥{{#Fixed $Cache.cart.moni_ach.express_cash}}</span>
            </span>
            <span class="price">优惠：
                <span>￥{{#Fixed $Cache.cart.moni_ach.sou_cash-$Cache.cart.moni_ach.cash}}</span>
            </span>
            <span class="price">需付金额：
                <span class="money">￥{{#Fixed $Cache.cart.moni_ach.finally_cash}}</span>
            </span>
            <span class="settlement">
            {{#if $State.cart.loading_cart}}
                <android:progressCircular size="30" color="{{bus_info.config.theme.first_color}}"></android:progressCircular>
            {{#else}}
                <button event-click="{{'$Event.cart.cart_to_ach'}}">确认订单</button>
            {{/if}}
            </span>
        </div>
    </div>
</div>
